package com.ruoyi.car.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.car.mapper.CarCustomerMapper;
import com.ruoyi.car.domain.CarCustomer;
import com.ruoyi.car.service.ICarCustomerService;

/**
 * 客户信息管理Service业务层处理
 * 
 * @author yby
 * @date 2025-09-01
 */
@Service
public class CarCustomerServiceImpl implements ICarCustomerService 
{
    @Autowired
    private CarCustomerMapper carCustomerMapper;

    /**
     * 查询客户信息管理
     * 
     * @param id 客户信息管理主键
     * @return 客户信息管理
     */
    @Override
    public CarCustomer selectCarCustomerById(Long id)
    {
        return carCustomerMapper.selectCarCustomerById(id);
    }

    /**
     * 查询客户信息管理列表
     * 
     * @param carCustomer 客户信息管理
     * @return 客户信息管理
     */
    @Override
    public List<CarCustomer> selectCarCustomerList(CarCustomer carCustomer)
    {
        return carCustomerMapper.selectCarCustomerList(carCustomer);
    }

    /**
     * 新增客户信息管理
     * 
     * @param carCustomer 客户信息管理
     * @return 结果
     */
    @Override
    public int insertCarCustomer(CarCustomer carCustomer)
    {
        carCustomer.setCreateTime(DateUtils.getNowDate());
        return carCustomerMapper.insertCarCustomer(carCustomer);
    }

    /**
     * 修改客户信息管理
     * 
     * @param carCustomer 客户信息管理
     * @return 结果
     */
    @Override
    public int updateCarCustomer(CarCustomer carCustomer)
    {
        carCustomer.setUpdateTime(DateUtils.getNowDate());
        return carCustomerMapper.updateCarCustomer(carCustomer);
    }

    /**
     * 批量删除客户信息管理
     * 
     * @param ids 需要删除的客户信息管理主键
     * @return 结果
     */
    @Override
    public int deleteCarCustomerByIds(Long[] ids)
    {
        return carCustomerMapper.deleteCarCustomerByIds(ids);
    }

    /**
     * 删除客户信息管理信息
     * 
     * @param id 客户信息管理主键
     * @return 结果
     */
    @Override
    public int deleteCarCustomerById(Long id)
    {
        return carCustomerMapper.deleteCarCustomerById(id);
    }
}
